![]() | http://www.wavecom.com/forum Release version: 3.04 |
This sample depends on the following libraries :
This application allows to perform download and upload operations, through a serial link, the GSM data link, or to/from a FTP server. The downloaded data can be stored in a RAM buffer, or in an A&D cell.
The download and upload operations are processed by the Download library.
The IP and FTP connection are processed by the IPConnect library. Please note that TCPIP connection parameters have firstly to be set using IPConnect commands set, before using this sample features.
As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.
AT+DWLSTART (Application Download start/stop command)
| Command | Answers |
| AT+DWLSTART? | +DWLSTART:
<state>
OK |
| AT+DWLSTART=? | +DWLSTART:
(0-1)
OK |
| AT+DWLSTART= <state> | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| state | 0-1 | The current application running state. This parameter is stored in non-volatile memory. | 0 |
The init entry point sent to the MultiApp library is the appdwl_init() function. The start/stop entry points linked to the +DWLSTART command are the appdwl_Start() and appdwl_Stop() functions.
The following command set allows an external application to manage RAM and application download and upload via the serial link or with a remote FTP server.
AT+USEIP (IP Library startup command)
| Command | Answers |
| AT+USEIP? | +USEIP:
<option>
OK |
| AT+USEIP=? | +USEIP:
(0-1)
OK |
| AT+USEIP= <option> | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| option | 0-1 | Use IP library or not ; on value change, the product has to be reset. This parameter is stored in non-volatile memory. | 0 |
AT+RAMDWL (RAM download command)
| Command | Answers |
| AT+RAMDWL? | +RAMDWL:
<size>
OK |
| AT+RAMDWL=? | +RAMDWL:
(1-20)
,
(0-1)
,
(120)
,
(120)
OK |
| AT+RAMDWL= <size> ,[ <protocol> ],[ <filename> ],[ <filepath> ] | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| size | 1-20 | RAM buffer size (in KBytes) where to copy downloaded data. This RAM buffer is allocated, and the dwl_Download API is used to start the download. | mandatory |
| protocol | 0-1 | 0 : 1K XModem protocol on serial link 1 : FTP protocol | 0 |
| filename | 120 | If FTP protocol is used, name of the file to download from the server. | NA |
| filepath | 120 | If FTP protocol is used, path of the file to download from the server ("." for server root directory). | NA |
AT+RAMUPL (RAM upload command)
| Command | Answers |
| AT+RAMUPL? | +RAMUPL:
<size>
OK |
| AT+RAMUPL=? | +RAMUPL:
(0-1)
,
(120)
,
(120)
OK |
| AT+RAMUPL= <protocol> ,[ <filename> ],[ <filepath> ] | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| protocol | 0-1 | 0 : 1K XModem protocol on serial link 1 : FTP protocol If something was previously downloaded in the RAM buffer, this command uses the dwl_Upload API to start the upload. | NA |
| filename | 120 | If FTP protocol is used, name of the file to upload on the server. | NA |
| filepath | 120 | If FTP protocol is used, path of the file to upload on the server ("." for server root directory). | NA |
| size | 1-20 | Current RAM buffer size (can only be read) | NA |
AT+APPDWL (Application download command)
| Command | Answers |
| AT+APPDWL? | +APPDWL:
<ID>
,
<size>
OK |
| AT+APPDWL=? | +APPDWL:
(0-3)
,
(u32)
,
(0-1)
,
(120)
,
(120)
OK |
| AT+APPDWL= <mode> , <ID> ,[ <protocol> ],[ <filename> ],[ <filepath> ] | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| mode | 0-3 | 0 : uses the dwl_Download API to start application download. The application is not installed on download end. 1 : uses the dwl_Download API to start application download. The application is installed on download end. 2 : installs an application previously downloaded with the AT+APPDWL=0 command. 3 : deletes the required cell ID. | mandatory |
| ID | u32 | ID of the storage cell. | NA |
| protocol | 0-1 | 0 : 1K XModem protocol on serial link 1 : FTP protocol | 0 |
| filename | 120 | If FTP protocol is used, name of the file to download from the server. | NA |
| filepath | 120 | If FTP protocol is used, path of the file to download from the server ("." for server root directory). | NA |
| size | u32 | Size of the storage cell (can only be read) | NA |
AT+APPUPL (Application upload command)
| Command | Answers |
| AT+APPUPL? | +APPUPL:
<ID>
,
<size>
OK |
| AT+APPUPL=? | +APPUPL:
(0-1)
,
(u32)
,
(120)
,
(120)
OK |
| AT+APPUPL=[ <protocol> ], <ID> ,[ <filename> ],[ <filepath> ] | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| protocol | 0-1 | 0 : 1K XModem protocol on serial link 1 : FTP protocol | 0 |
| ID | u32 | ID of the storage cell. | NA |
| filename | 120 | If FTP protocol is used, name of the file to upload on the server. | NA |
| filepath | 120 | If FTP protocol is used, path of the file to upload on the server ("." for server root directory). | NA |
| size | u32 | Size of the storage cell (can only be read) | NA |
When the application receives a GSM data call indication, it answers it automaticaly. On the CONNECT indication, the dwl_Download API is used to start the application download via the GSM data link, in authentification mode. The remote part is prompted to give a password in order to start the download. This password is "startdota" by default, and can be change by the AT+DWLPWD command :
AT+DWLPWD (Change password command)
| Command | Answers |
| AT+DWLPWD=? | +DWLPWD:
(10)
,
(10)
OK |
| AT+DWLPWD= <oldpassword> , <newpassword> | +CME ERROR: 3 or OK |
| Parameter | Values range | Description | Default value |
| oldpassword | 10 | Current download password (by default : "startdota") | NA |
| newpassword | 10 | New password, to replace the old one (stored in non-volatile memory). | NA |
If the remote application enters the right password (three tries), the 1K XMODEM application over the air download is started, and the new application is installed on download end.
Updated : Thu Apr 27 14:12:36 CEST 2006